const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 报表管理
const routers = [
  {
    path: '/reportManage',
    meta: {
      title: '报表管理',
      icon: 'el-icon-s-cooperation'
    },
    redirect: '/reportManage',
    component: RouteView,
    children: [
      {
        path: '/reportManage/salesAfter',
        meta: {
          title: '售后报表'
        },
        redirect: '/reportManage/salesAfter',
        component: RouteView,
        children: [
          {
            path: '/reportManage/salesAfter/wxrytjrb',
            meta: {
              title: '维修人员工时统计日报',
              keepAlive: true
            },
            component: AsyncComponent('reportManage/salesAfter/wxrytjrb')
          },
          {
            path: '/reportManage/salesAfter/jsmxyb',
            meta: {
              title: '结算明细月报',
              keepAlive: true
            },
            component: AsyncComponent('reportManage/salesAfter/jsmxyb')
          },
          {
            path: '/reportManage/salesAfter/technicianWorkHours',
            meta: {
              title: '技师工时统计表',
              keepAlive: true
            },
            component: AsyncComponent('reportManage/salesAfter/technicianWorkHours')
          },
          {
            path: '/reportManage/salesAfter/pjckmxbb',
            meta: {
              title: '经销商配件出库明细报表',
              keepAlive: true
            },
            component: AsyncComponent('reportManage/salesAfter/pjckmxbb')
          },
          {
            path: '/reportManage/salesAfter/operatingIncome',
            meta: {
              title: '营业收入汇总',
              keepAlive: true
            },
            component: AsyncComponent('reportManage/salesAfter/operatingIncome')
          },
        ]
      },
    ]
  }
];
export default routers;
